# import string
# import random
# # ['a', 'b', ..]
# # 获取到 a-zA-Z
# source = list(string.ascii_letters)
# # 遍历循环
# for i in range(1,10):
#     source.append(str(i))
#
# captcha = ''.join(random.sample(source, 4))
# print(captcha)
# print(captcha.lower() == 'aaa')

# from functools import wraps
# from django.contrib.auth.decorators import login_required
#
#
# def b(func):
#     @wraps(func)  # 每一个没这个装饰器装饰的函数 函数的元信息
#     def wrapper(*args, **kwargs):
#         print('================')
#         func(*args, **kwargs)
#         print('================')
#
#     return wrapper
#
#
# @b  # a = b(a)
# def a(c):
#     print(c)
#
#
# # 闭包 / 高价函数的使用
# print(a.__name__)
# a(c=16)  # wrapper()
